/*
 * ConnectionInfo.h
 *
 *  Created on: 09.12.2012
 *      Author: zheka
 */

#ifndef CONNECTIONINFO_H_
#define CONNECTIONINFO_H_

#include <netinet/in.h>
#include <netdb.h>
#include <string>
#include <arpa/inet.h>




class ConnectionInfo {
public:
	ConnectionInfo(std::string hostName, int port);
	void resolveHost();
	int getPort();
	std::string getHost();
	sockaddr * getAddress();
	size_t getAddressSize();
	std::string getHostAddress();
private:
	  sockaddr_in address;

	  std::string hostName;
	  std::string hostAddress;
	  int port;


};

#endif /* CONNECTIONINFO_H_ */
